<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="master.html" />
<head/>

<body>

<div id="ViewContextBox" >

      <h1>${context.title}</h1>
      <div id="linkbar">
        <a id="edit_context_link" href="#" onclick="toggle('edit_context');toggle('description'); return false;"><img src="/static/images/edit.png" title="edit"/></a>
        <a id="delete_context_link" href="#" onclick="toggle('confirm_delete_context')"><img src="/static/images/delete.gif" title="delete"/></a>
        <div id="confirm_delete_context" class="confirm" style="display: none">
          Are you sure you want to delete the context?
          <a href="/context/delete?id=${context.id}">Yes</a>
          <a href="#" onclick="toggle('confirm_delete_context');">No</a>
        </div>
         <a href="#" id="add_action" onclick="toggle('AddActionBox'); return false;"><img src="/static/images/new.gif" title="add action"/></a>
      </div>
</div>

<xi:include href="createAction.html" />

<div id="edit_context" style="display: none;">
  <form action="/context/update" method="post">
    <fieldset>
      <legend>Edit</legend>
      <input type="hidden" id="id" name="id" value="${context.id}" />
      <p>
        <label for="title">Title</label>
        <input type="text" id="title" name="title" value="${context.title}" onkeypress="handleKeyPress(event)"/>
      </p>
      <input type="submit" name="submit_updateContext" value="Update" />
      <input type="submit" onclick="toggle('edit_context'); $('#ViewContextBox').ScrollTo(800);return false;" value="cancel"/>
    </fieldset>
  </form>
</div>

<h3>Open Actions</h3>
  <xi:include href="tableSortMsg.html"/>
  <table id="actions" class="stripe">
      <xi:include href="actionTableHeaders.html"/>
      <tbody>
        <xi:include href="action.html" py:for="action in context._get_openActions" />
      </tbody>
  </table>

<br/>
</body>
</html>
